from classpath import entry


class CompositeEntry(entry.IEntry):
    compositeEntry=[]

    def readClass(self,className):
        print(len(self.compositeEntry))
        for entry in self.compositeEntry:
            try:
                data=entry.readClass(className)
                return data
            except:
                pass
        return None

            

    def String(self):
        strs=[]
        str = '\n'
        for entry in self.compositeEntry:
            strs.append(entry.String())
        return str.join(strs)
    def append(self,entry):
        #print(len(self.compositeEntry))
        self.compositeEntry.append(entry)